<include file="Public/min-header" />
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">日志列表</h3>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="list-table" class="table table-bordered table-striped dataTable">
                                    <thead>
                                        <tr role="row">
                                            <th width = "10%" class = "align-center">ID</th>
                                            <th width = "20%" class = "align-center">角色名称</th>
                                            <th class = "align-center">描述</th>
                                            <th width = "12%" class = "align-center">IP</th>
                                            <th width = "15%" class = "align-center">操作时间</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <foreach name="list" item="vo" key="k">
                                            <tr role="row">
                                                <td align="center">{$vo.log_id}</td>
                                                <td>{$vo.user_name}</td>
                                                <td>{$vo.log_info}</td>
                                                <td>{$vo.log_ip}</td>
                                                <td align="center">{$vo.log_time|date="Y-m-d H:i:s",###}</td>
                                                <!--
                                                            <td>
                                                               <a class="btn btn-danger" href="javascript:;" data-url="{:U('Admin/logDel')}" data-id="{$vo.log_id}" onclick="delfun(this)"><i class="fa fa-trash-o"></i></a>
                                                                                </td>
                                                                            -->
                                            </tr>
                                        </foreach>
                                    </tbody>
                                    <tfoot>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6 text-left"></div>
                            <div class="col-sm-6 text-right">{$page}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
<script>
function delfun(obj) {
    layer.confirm('确认删除？', {
        btn: ['确定', '取消']
    }, function() {
        $.ajax({
            type: 'post',
            url: $(obj).attr('data-url'),
            data: {
                act: 'del',
                log_id: $(obj).attr('data-id')
            },
            dataType: 'json',
            success: function(data) {
                if (data == 1) {
                    $(obj).parent().parent().remove();
                } else {
                    layer.msg(data, {
                        icon: 2,
                        time: 2000
                    });
                }
            }
        });
    }, function() {
        // 取消
    });
    return false;
}
</script>
</body>

</html>
